function UpdateRacialBonus()
{
	var currentField = WebPlayer.position - 1;
	var bonus;
	for (key in racialEffects[currentField])
	{
		if (key.toString() == races[WebPlayer.race])
		{
			bonus = racialEffects[currentField][key];
			break;
		}
	}
	if (bonus != null && bonus.length > 0 && WebPlayer.raceSensible)
	{
		// additional tasks
		if (WebPlayer.position == 6 && WebPlayer.race == 6)
		{	// force next embush
			nextEmbushForced = true;
		}
		else if (WebPlayer.position == 7 && (WebPlayer.race == 1 || WebPlayer.race == 5))
		{	// bonus dungeon prison
			var random = getRandomInt(0, 9);
			var addString;
			if (random % 2 == 0)
			{
				addString = "You get fucked by another skinny person in the maze (small dildo, normal speed)!";
			}
			else
			{
				addString = "You get fucked by the keeper (big dildo, rough)! Whip it into your face after finished.";
			}
			bonus = bonus.replace("@T@", "Don't touch anything except what is asked for. Tie up yourself! Use the blindfold and a gag. " + addString);
		}
		else if (WebPlayer.position == 5 && WebPlayer.race == 4)
		{
			var rand = getRandomInt(0, 9);
			bonus = bonus.replace("@T@", tasks[4][rand]);
		}
		else if (WebPlayer.position == 4 && (WebPlayer.race == 4 || WebPlayer.race == 7))
		{
			bonus = bonus.replace("@T@", tasks[4][1] + " ...after you finished here.");
		}
		else if (WebPlayer.position == 3 && WebPlayer.race == 5)
		{
			countdownTimer = countdownTimer * 2;
			$('#timer').replaceWith('<span style="text-align:justify;" id="timer">' + countdownTimer + ' seconds left</span>');
		}
		$('#raceBonusDesc').replaceWith('<span style="text-align:justify;" id="raceBonusDesc"><i>Racial bonus task:</i> ' + bonus + '</span>');
	}
	else
	{
		$('#raceBonusDesc').replaceWith('<span style="text-align:justify;" id="raceBonusDesc">'+(WebPlayer.raceSensible?'No racial bonus task!':'You are protected by nipple clamps!')+'</span>');
	}
}

// Functions for updateing status strings
function UpdateRace()
{
	$("#raceField").replaceWith('<td id="raceField">' + races[WebPlayer.race] + '</td>');
}
function UpdatePosition()
{
	$("#posField").replaceWith('<td id="posField">' + positions[WebPlayer.position] + '</td>');
}
function UpdateGoldPieces()
{
	$("#gpField").replaceWith('<td id="gpField">' + WebPlayer.gold + '</td>');
}
function UpdateLevel()
{
	$("#lvlField").replaceWith('<td id="lvlField">' + WebPlayer.level + '</td>');
}